package com.qrxl.common.entity;

import com.qrxl.common.vo.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 字典10-省市区编码表
 * </p>
 *
 * @author zhoukun
 * @since 2020-12-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ProvinceCityArea extends BaseEntity {

    private static final long serialVersionUID = 517224396302758L;

    @NotNull(message = "省的行政编码不能为空！")
    @Length(message = "省的行政编码 {min}到{max}字符！", max = 10, min = 1)
    @ApiModelProperty(value = "省的行政编码", required = true)
    private String provinceCode;

    @NotNull(message = "省的行政名称不能为空！")
    @Length(message = "省的行政名称 {min}到{max}字符！", max = 100, min = 1)
    @ApiModelProperty(value = "省的行政名称", required = true)
    private String provinceName;

    @NotNull(message = "市的行政编码不能为空！")
    @Length(message = "市的行政编码 {min}到{max}字符！", max = 10, min = 1)
    @ApiModelProperty(value = "市的行政编码", required = true)
    private String cityCode;

    @NotNull(message = "市的行政名称不能为空！")
    @Length(message = "市的行政名称 {min}到{max}字符！", max = 100, min = 1)
    @ApiModelProperty(value = "市的行政名称", required = true)
    private String cityName;

    @NotNull(message = "区的行政编码不能为空！")
    @Length(message = "区的行政编码 {min}到{max}字符！", max = 10, min = 1)
    @ApiModelProperty(value = "区的行政编码", required = true)
    private String areaCode;

    @NotNull(message = "区的行政名称不能为空！")
    @Length(message = "区的行政名称 {min}到{max}字符！", max = 100, min = 1)
    @ApiModelProperty(value = "区的行政名称", required = true)
    private String areaName;
}
